package design.pattern.Observer;

import java.io.Serializable;

public class User implements Observer, Serializable {

    String name;

    public User(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        System.out.println(this.name+":接收到微信公众号的变更消息:"+message);
        read(message);
    }
    public void read(String message){
        System.out.println(this.name+":阅读微信公众号的变更消息:"+message);
    }
}
